import request from '@/utils/request'
/**
 * 新增部门
 *
 */
export function addDepartMent(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

/**
 * 查询部门列表
 *
 */
export function getDepartMent() {
  return request({
    url: '/company/department'
  })
}

/**
 *
 * 根据id修改部门详情
 */
export function updateDepartMent(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
/**
 * 根据id删除部门
 *
 */
export function delDepartMent(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
/**
 * 根据id查询部门详情
 */
export function getDepartMentId(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
